In the past years, digital imaging devices, such as digital cameras have taken a remarkable role in imaging technology. Traditional cameras rely entirely on chemical and mechanical processes, and there is generally no need for electricity to operate with one. However, digital cameras have one or more built-in processors and these cameras record images in an entirely digital form. Because of their electronic nature, digital cameras (or digital camera modules) can be readily integrated to other electronic devices, of which mobile telecommunication devices (mobile terminals) are nowadays the most common examples. Depending on the master device, (i.e. the device the camera module is integrated with) the camera module can communicate with several other components and systems of said device. E.g. in a camera phone, the camera module is typically operatively communicating with one or more processors, and in the case of a digital camera, the device can comprise some other type of dedicated signal processing components.
A digital camera has a series of lenses, a lens system that focuses light to create an image of a scene. But instead of focusing this light onto a piece of film, it focuses it onto a semiconductor device that records light electronically. This semiconductor device can be e.g. a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-Coupled Device) sensor. The sensor is mainly composed of a collection of light-sensitive pixels, which convert light into electrical charge and this electronic charge is further converted into digital image data. Typically, digital image data is mainly processed outside the sensor component itself, but nowadays it is also possible to integrate logic and memory into the CMOS sensors. U.S. Pat. No. 6,570,617 B2 discloses a single chip camera, where certain signal and control electronics have been integrated on the same substrate with the photosensitive element.
Deviating significantly from the conventional film type cameras, the modern digital cameras usually have integrated color displays that provide a preview of the frame that the user is capturing. This display can be used as a digital viewfinder instead of a traditional optical viewfinder. The image that is seen on the display is typically taken directly from the image sensor and after scaling down from its original resolution displayed on the viewfinder display. This procedure ensures rapidly updating live display during such preview mode. The preview image is also used for image based autofocusing purposes in the manner described below.
Typically, in the digital camera the image sensor outputs data in lower resolution QVGA (Quarter Video Graphic Array) for the display because of the aforementioned requirement to have rapidly updating preview display and because of the limited pixel resolution of the display. During preview mode image based autofocusing can be performed by analyzing the low-resolution image and by adjusting the lens system accordingly to improve the focusing. The user can check the image displayed on the viewfinder display to see if the autofocusing has been successfully applied. Also non-image based focusing can be applied here by using, for example, various distance measuring methods known in the art. This lowered image resolution intended for viewfinder preview is, however, not high enough to perform accurate image based focusing in the modern multimegapixel, e.g. 3 megapixel cameras. In other words, the scaled down image resolution is not high enough to provide the basis for accurate image analysis to fine tune autofocusing. Therefore, before the image is captured, in addition to the aforementioned prefocusing measures, the camera needs to typically perform some final focusing steps based on higher resolution image data.
The operation of the autofocusing and previewing functions of the prior art digital cameras may deviate in their details somewhat from the description given above, but it can be realized that the prior art systems have certain severe limitations especially with respect to providing exact focus data from megapixel images continuously and without unnecessary delays. It can be realized that in prior art systems exact focus data is not available all the time, because at certain times only a scaled down low resolution image intended for the viewfinder might be available. Also, in some cases when the high-resolution images are captured for final focusing, the viewfinder images might not be updated properly.
It can be seen that even though digital cameras provide new and interesting ways for imaging, there still is a need for improved focusing methods, which are more accurate and faster than the ones in current technology, and that can cope with the ever-increasing sensor resolutions. In addition, such methods should also work in situations where the image needs to be scaled down for generating a higher picture frequency, for example, for preview purposes. Automatic image processing, e.g. automatic white balancing should be possible with best results even with cropped images. The following description discloses a solution that addresses these needs.